package com.nuc.zyt.day03.Lambda.demo1;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.TreeSet;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * @ClassName Method
 * @Description TODO
 * @Author 耀酱
 * @Date 2023/5/24 20:32
 * @Version 1.0
 */

public class Method {
    public static void main(String[] args) {
        // 方法引用
        Runnable runnable = String::new;
        List<Integer> collect = Stream.of(1, 5, 6, 8).collect(Collectors.toList());
        TreeSet<Integer> collect1 = Stream.of(1, 5, 8, 4, 4).collect(Collectors.toCollection(TreeSet::new));
    }
}
